function * func1() {
  console.log('func1 start')

  const bbb = yield 'aaa'
  console.log('bbb', bbb)

  const ccc = yield
  console.log('ccc', ccc)

  try {
    yield;
  } catch(e) {
    console.error(e)
  }
}

const funcGenerator = func1()
const result1 = funcGenerator.next()
console.log(result1)
funcGenerator.next('BBB')
funcGenerator.next('CCC')
funcGenerator.throw(new Error('抛出异常'))
